package com.lzh.tiktok.user.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;

/**
 * @author lizhihang
 * @create 2023-01-29 14:09
 */
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
@TableName("message")
public class MessageEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId
    private Long messageId;

    private Integer fromUserId;

    private String message;

    private Integer toUserId;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;


}
